function showData(dataList, imgPath) {
  ocrType = "牙叔圆形识别测试";
  log("显示数据 imgPath = " + imgPath);
  var img = images.read(imgPath);
  var canvas = new Canvas(img);
  let circlePaint = new Paint();
  circlePaint.setStrokeWidth(3);
  circlePaint.setColor(colors.parseColor("#00ff00"));
  circlePaint.setStyle(Paint.Style.STROKE); //空心矩形框

  let textPaint = new Paint();
  textPaint.setTextAlign(Paint.Align.CENTER);
  textPaint.setTextSize(30);
  textPaint.setStyle(Paint.Style.FILL);
  textPaint.setColor(colors.parseColor("#f000ff"));
  var len = dataList.length;
  for (var i = 0; i < len; i++) {
    let data = dataList[i];
    // { x: 464.5, y: 566.5, radius: 15.399999618530273 },
    canvas.drawCircle(data.x, data.y, data.radius, circlePaint);
    canvas.drawText(i + "", data.x, data.y, textPaint);
  }
  var image = canvas.toImage();
  let newFilename = files.getNameWithoutExtension(imgPath) + "_" + ocrType + ".png";
  let newFilepath = "/sdcard/脚本/" + ocrType + "/" + newFilename;
  files.createWithDirs(newFilepath);
  images.save(image, newFilepath);
  log("识别后的图片保存路径: " + newFilepath);
  img.recycle();
  image.recycle();
  return newFilepath;
}

events.on("exit", function () {
  log("结束运行 模块脚本");
});

module.exports = showData;
